﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data;
using KPIS.GERP.GHRMS.DAL;
using KPIS.GERP.GHRMS.MODEL;
using KPIS.GERP.GHRMS.IDAL;
using KPIS.GERP.GHRMS.IBLL;
using KPIS.GERP.GHRMS.DALFactory;

namespace KPIS.GERP.GHRMS.BLL
{
    public class HRMJobSpecListBLL : IHRMJobSpecListBLL
    {
        private static readonly IHRMJobSpecListDAL dal = DataAccess.CreateJobSpecList();

        private FieldInfo fieldInfo = new FieldInfo();
        private ExecutiveInfo execInfo = new ExecutiveInfo();
        private EmployeeTypeInfo etInfo = new EmployeeTypeInfo();
        private JobSiteInfo jsInfo = new JobSiteInfo();
        private PositionTypeInfo ptInfo = new PositionTypeInfo();
        private ClassSpecificationInfo specInfo = new ClassSpecificationInfo();
        private PositionStatusInfo psInfo = new PositionStatusInfo();
        private PositionInfo upperInfo = new PositionInfo();
        private PositionInfo workingInfo = new PositionInfo();
        private PositionInfo posInfo = new PositionInfo();

        public IList<PositionInfo> LoadPositionTreeView(Nullable<int> EmpTypeSeq)
        {
            return dal.LoadPositionTreeView(EmpTypeSeq);
        }

        public IList<TreeViewInfo> LoadPositionJobsites(Nullable<int> EmpTypeSeq, string ParentID)
        {
            return dal.LoadPositionJobsites(EmpTypeSeq, ParentID);
        }

        public void Insert(string strPosSeq, string strSpecDetail, int intCreatedBy)
        {
            dal.Insert(strPosSeq, strSpecDetail, intCreatedBy);
        }
                                       
        public DataTable Search(string intJobSpacSeq, string strPosSeq, string strSpecDetail)
        {
            return dal.Search(intJobSpacSeq, strPosSeq, strSpecDetail);
        }

        public void Update(string strSpecDetail, string intJobSpacSeq, int intCreateBy)
        {
            dal.Update(strSpecDetail, intJobSpacSeq, intCreateBy);
        }

        public void Delete(string intJobSpacSeq, int intCreateBy)
        {
            dal.Delete(intJobSpacSeq, intCreateBy);
        }

        public bool CheckValueSubmit(string intJobSpacSeq)
        {
           return dal.CheckValueSubmit(intJobSpacSeq);
        }

        public string LoadNamePos(string strPosSeq)
        {
            return dal.LoadNamePos(strPosSeq);
        }
    }
}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              